{include file="public/meat" title="自订义用户字段列表"/}
<div class="cx-fex-c">
    <div class="x11 pad-t15 pad-b10">
        <div class="cx-fex-c">
            <div class="xs6 xl12">
                {if $btn.add}
                <a href="{:url('add')}" class="button bg-blue">添加字段</a>
                {/if}
            </div>
            <div class="xs6 xl12">
            </div>
        </div>
    </div>
    <div class="x11">
        <form class="layui-form" role="form" action="" method="post">
            <table class="cx-teble cx-teble-bor-w cx-teble-bor cx-table-striped cx-table-hover cx-table-responsive-w">
                <thead>
                <tr>
                    <th>字段名</th>
                    <th>数据库键名</th>
                    <th>表单类型</th>
                    <th class="t-c">是否必填</th>
                    <th class="t-c" width="80">排序</th>
                    {if $btn.edit || $btn.del}<th class="text-c" width="120">编辑</th>{/if}
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="cx" empty="" }
                <tr>
                    <td>{$cx.title|default=''}</td>
                    <td>{$cx.sqlname|default=''}</td>
                    <td>{$cx.formtext|default=''}</td>
                    <td class="t-c">
                        {eq name="$cx.formrequired|default=''" value="1"}<a class="btn size-S btn-danger pointer" title="必填">必填</a>{/eq}
                    </td>
                    <td class="t-c f-24">
                        <input class="ipt ipt-S t-c" type="text" name="{$cx.sqlname}" value="{$cx.sort}">
                    </td>
                    {if $btn.edit || $btn.del}
                    <td class="t-c">
                        {if $btn.edit}<a class="button button-S bg-green mr-5" href="{:url('edit',array('id'=>$cx['sqlname']))}" title="编辑">编辑</a>{/if}
                        {if $btn.del}<a class="button button-S bg-red cx-click" data-id="{$cx['sqlname']}" data-href="{:url('del')}" data-type="deldata">删除</a>{/if}
                    </td>
                    {/if}
                </tr>
                {/volist}
                </tbody>
            </table>
            <div class="t-c pad-t20">
                {if $btn.edit}<button class="button button-S bg-blue" lay-submit lay-filter="all-btn">修改排序</button>{/if}
            </div>
        </form>
    </div>
</div>
<div style="height: 20px; overflow: hidden"></div>
{include file="public/js" /}
<script>
    layui.config({
        base: '__ADMIN__/js/'
    }).use('app');
</script>
{include file="public/footer" /}